package main

import (
	"encoding/json"
	"fmt"
)

func main() {
	fmt.Println("json")
	t := Test{1, "aaa"}
	b, _ := json.Marshal(t)
	j := string(b)

	fmt.Printf("%T %v\n", j, j)
	fmt.Println(j)
	// os.OpenFile("test.json")
	t2 := &Test{}
	json.Unmarshal(b, t2)
	fmt.Printf("%#v\n", t2)
}

type Test struct {
	A int    `json:"a"`
	B string `json:"b"`
}
